<%--
  Created by IntelliJ IDEA.
  User: maoma
  Date: 2024/3/3
  Time: 18:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
   <%-- <style>
        table{
            border-style: dotted dashed solid double;
            margin-left:auto;
            margin-right:auto;
            atext-align: center;
            background-color: chartreuse;
            width: 500px;
        }
    </style>--%>
    <link rel="stylesheet" type="text/css" href="../css/register.css">
   <%-- <script type="text/javascript">
        function checkUsername(){
           var regex=/^[a-zA-Z_]\w{0,9}$/;
    //匹配字符串开始，开头为大小写或下划线，字母、数字、下划线0~9次，字符串结束
    var value=document.getElementById("username").value;
    console.log(value);//在浏览器中调试
    var msg="";
    if(!value)
        msg="用户名必须填写";
    else if(!regex.test(value))
        msg="用户名不合法";
    document.getElementById("usernameMsg").innerHTML=msg;
    return msg == "";// 如果提示消息为空则代表没出错, 返回true
        }
    </script>--%>
    <script type="text/javascript" src="../js/register.js"></script>
    <link rel="stylesheet" href="../Bootstrap/css/bootstrap.css">
    <script src="../Bootstrap/js/bootstrap.bundle.js"></script>
</head>
<body>
<div style="position: relative;width: 700px;height: 80px;background-color: bisque;margin: 0 auto">
nihao
</div>
<div style="position: relative;width: 700px;height: 900px;margin-left: auto;margin-right:auto ">
<form action="b.html" onsubmit="return checkForm();">
  <%--  <table border="1" align="center" bgcolor="#7fffd4" width="500px">--%>
       <%-- <table style="border-style: dotted dashed solid double;margin-left:auto;margin-right:auto;atext-align: center;background-color: chartreuse;width: 500px">--%>
       <%--<table class="table">--%>
      <table>
      <tr>
            <td width="20%">用户名</td>
            <td><input id="username" type="text" onblur="checkUsername();"/></td>
            <td><span id="usernameMsg"><font color="red">字母数字下划线1到10位，不能是数字开头</font></span></td>
        </tr>
        <tr>
            <td>密码</td>
            <td><input id="password" type="password"/></td>
            <td><span id="passwordMsg"><font color="red">密码请设置6-16位字符</font></span></td>
        </tr>
        <tr>
            <td>用户类型</td>
            <td><select id="usertype">
                <option value="1">管理员</option>
                <option value="2">普通用户</option>
            </select></td>
            <td></td>
        </tr>
        <tr>
            <td>性别</td>
            <td><input name="sex" type="radio" value="male"/>男
                <input name="sex" type="radio" value="female"/>女
            </td>
            <td></td>
        </tr>
        <tr>
            <td>出生日期</td>
            <td><input id="birthday" type="date"/></td>
            <td></td>
        </tr>
        <tr>
            <td>兴趣爱好</td>
            <td><input name="hobby" type="checkbox" value="reading"/>阅读
                <input name="hobby" type="checkbox" value="music"/>音乐
            </td>
            <td></td>
        </tr>
        <tr>
            <td>电子邮件</td>
            <td><input name="email" type="email"/>
            </td>
            <td></td>
        </tr>
        <tr>
            <td>自我介绍</td>
            <td colspan="2"><textarea name="introduction" cols="40" rows="5"></textarea>
            </td>
        </tr>
        <tr>
            <td colspan="3" align="center"><input name="submit" type="submit" value="提交"/>
                <input name="reset" type="reset" value="重置"/>
            </td>
        </tr>
    </table>
</form>
</div>
</body>
</html>
